﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Sparrow.Extensions
{
    public static class ObjectExtensions
    {
        public static bool IsNull(this object source)
        {
            return source == null;
        }

        public static T LazyInit<T>(this T obj, Func<T> initializer)
        {
            if (obj == null)
            {
                obj = initializer();
            }

            return obj;
        }
    }
}
